package fr.thelem.gestiondemandesthelem.dao.model;

import static javax.persistence.CascadeType.PERSIST;
import static javax.persistence.CascadeType.REMOVE;

import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Entité Parametre Etape : Représente les paramètres d'une étape
 */
@Entity
@Table(name = "CD_PARAMETRE_ETAPE")
public class CDParametreEtapeEntity implements Serializable {
    /** Attribut serialVersionUID */
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "IDENTIFIANT_CD_PARAMETRE_ETAPE")
    @GeneratedValue
    private int identifiantCDParametreEtape;

    @Column(name = "NOM_CD_PARAMETRE_ETAPE", unique = true)
    private String nomCDParametreEtape;

    @Column(name = "DESCRIPTION_CD_PARAMETRE_ETAPE")
    private String descriptionCDParametreEtape;

    @Column(name = "TYPE_SAISIE_CD_PARAMETRE_ETAPE")
    private String typeSaisieCDParametreEtape;

    @OneToMany(cascade = {PERSIST}, mappedBy = "CDParametresEtapeCorrespondanceParametre")
    private Collection<CorrespondanceParametresEntity> correspondanceParametreCDParametreEtapes;

    @ManyToMany(cascade = {PERSIST}, mappedBy = "CDParametresEtapeCDEtape")
    private Collection<CDEtapeEntity> CDEtapesCDParametreEtape;

    @OneToMany(cascade = {PERSIST, REMOVE}, mappedBy = "CDParametreEtape")
    private Collection<CPParametreEtapeEntity> CPParametreEtapes;

    /**
     * Constructeur
     */
    public CDParametreEtapeEntity() {
        super();
        this.correspondanceParametreCDParametreEtapes = new HashSet<CorrespondanceParametresEntity>();
        this.CDEtapesCDParametreEtape = new HashSet<CDEtapeEntity>();
        this.CPParametreEtapes = new HashSet<CPParametreEtapeEntity>();
    }

    /**
     * Accesseur de identifiantCDParametreEtape
     * 
     * @return le identifiantCDParametreEtape
     */
    public int getIdentifiantCDParametreEtape() {
        return identifiantCDParametreEtape;
    }

    /**
     * Affectation de identifiantCDParametreEtape
     * 
     * @param identifiantCDParametreEtape identifiantCDParametreEtape à affecter
     */
    public void setIdentifiantCDParametreEtape(int identifiantCDParametreEtape) {
        this.identifiantCDParametreEtape = identifiantCDParametreEtape;
    }

    /**
     * Accesseur de nomCDParametreEtape
     * 
     * @return le nomCDParametreEtape
     */
    public String getNomCDParametreEtape() {
        return nomCDParametreEtape;
    }

    /**
     * Affectation de nomCDParametreEtape
     * 
     * @param nomCDParametreEtape nomCDParametreEtape à affecter
     */
    public void setNomCDParametreEtape(String nomCDParametreEtape) {
        this.nomCDParametreEtape = nomCDParametreEtape;
    }

    /**
     * Accesseur de descriptionCDParametreEtape
     * 
     * @return le descriptionCDParametreEtape
     */
    public String getDescriptionCDParametreEtape() {
        return descriptionCDParametreEtape;
    }

    /**
     * Affectation de descriptionCDParametreEtape
     * 
     * @param descriptionCDParametreEtape descriptionCDParametreEtape à affecter
     */
    public void setDescriptionCDParametreEtape(String descriptionCDParametreEtape) {
        this.descriptionCDParametreEtape = descriptionCDParametreEtape;
    }

    /**
     * Accesseur de typeSaisieCDParametreEtape
     * 
     * @return le typeSaisieCDParametreEtape
     */
    public String getTypeSaisieCDParametreEtape() {
        return typeSaisieCDParametreEtape;
    }

    /**
     * Affectation de typeSaisieCDParametreEtape
     * 
     * @param typeSaisieCDParametreEtape typeSaisieCDParametreEtape à affecter
     */
    public void setTypeSaisieCDParametreEtape(String typeSaisieCDParametreEtape) {
        this.typeSaisieCDParametreEtape = typeSaisieCDParametreEtape;
    }

    /**
     * Accesseur de correspondanceParametreCDParametreEtapes
     * 
     * @return le correspondanceParametreCDParametreEtapes
     */
    public Collection<CorrespondanceParametresEntity> getCorrespondanceParametreCDParametreEtapes() {
        return correspondanceParametreCDParametreEtapes;
    }

    /**
     * Affectation de correspondanceParametreCDParametreEtapes
     * 
     * @param correspondanceParametreCDParametreEtapes correspondanceParametreCDParametreEtapes à affecter
     */
    public void setCorrespondanceParametreCDParametreEtapes(Collection<CorrespondanceParametresEntity> correspondanceParametreCDParametreEtapes) {
        this.correspondanceParametreCDParametreEtapes = correspondanceParametreCDParametreEtapes;
    }

    /**
     * Accesseur de cDEtapesCDParametreEtape
     * 
     * @return le cDEtapesCDParametreEtape
     */
    public Collection<CDEtapeEntity> getCDEtapesCDParametreEtape() {
        return CDEtapesCDParametreEtape;
    }

    /**
     * Affectation de cDEtapesCDParametreEtape
     * 
     * @param cDEtapesCDParametreEtape cDEtapesCDParametreEtape à affecter
     */
    public void setCDEtapesCDParametreEtape(Collection<CDEtapeEntity> cDEtapesCDParametreEtape) {
        CDEtapesCDParametreEtape = cDEtapesCDParametreEtape;
    }

    /**
     * Accesseur de cPParametreEtapes
     * 
     * @return le cPParametreEtapes
     */
    public Collection<CPParametreEtapeEntity> getCPParametreEtapes() {
        return CPParametreEtapes;
    }

    /**
     * Affectation de cPParametreEtapes
     * 
     * @param cPParametreEtapes cPParametreEtapes à affecter
     */
    public void setCPParametreEtapes(Collection<CPParametreEtapeEntity> cPParametreEtapes) {
        CPParametreEtapes = cPParametreEtapes;
    }

}
